/**
 * 
 */
package com.hj.service;

import java.util.List;
import java.util.Map;

/**
 * 通用服务接口
 * 
 * @author huangjian
 */
@SuppressWarnings("rawtypes")
public interface CommonService {
	public <T> T findByPK(Class<T> entityClass, Object primaryKey);

	public <T> T findUnique(final String qlString, final Object... obj);

	public List findBy(String qlString, Map<String, Object> parameter);

	public List findBy(String qlString, Object... obj);

	public <T> List<T> findBy(String qlString, Class<T> resultClass, Map<String, Object> parameter);

	public <T> List<T> findBy(String qlString, Class<T> resultClass, Object... obj);

	public List findBySql(String sqlString, Map<String, Object> parameter);

	public List findBySql(String sqlString, Object... obj);

	public List findBySql(String sqlString, Class resultClass, Map<String, Object> parameter);

	public List findBySql(String sqlString, Class resultClass, Object... obj);

	public List findByNamedQuery(String name, Map<String, Object> parameter);

	public List findByNamedQuery(String name, Object... obj);

	public int batchExcute(String qlString, Map<String, Object> parameter);

	public int batchExcute(String qlString, Object... obj);

	public int batchExcuteSql(String sqlString, Map<String, Object> parameter);

	public int batchExcuteSql(String sqlString, Object... obj);
	
	public boolean executeStoreProcedure(String name, Map<Integer, String> map);

}
